import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'Index',
    component: () => import('../views/Index.vue')
  },
  {
    path: '/businessList',
    name: 'BusinessList',
    component: () => import('../views/business/BusinessList.vue')
  },
  {
    path: '/businessInfo',
    name: 'BusinessInfo',
    component: () => import('../views/business/BusinessInfo.vue')
  },
  {
    path: '/order',
    name: 'Order',
    component: () => import('../views/order/Order.vue')
  },
  {
    path: '/payment',
    name: 'Payment',
    component: () => import('../views/order/Payment.vue')
  },
  {
    path: '/deliveryAddress',
    name: 'DeliveryAddress',
    component: () => import('../views/address/DeliveryAddress.vue')
  },
  {
    path: '/addDeliveryAddress',
    name: 'AddDeliveryAddress',
    component: () => import('../views/address/AddDeliveryAddress.vue')
  },
  {
    path: '/editDeliveryAddress',
    name: 'EditDeliveryAddress',
    component: () => import('../views/address/EditDeliveryAddress.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/user/Login.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('../views/user/Register.vue')
  },
  {
    path: '/orderList',
    name: 'OrderList',
    component: () => import('../views/order/OrderList.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router